import React from "react";
import { BrowserRouter, Switch, Route, Redirect } from "react-router-dom";
import Home from "~/home";
import About from "~/about";
import Blank from "~/blank";
import Login from "~/login";
// 路由组件
export default function RouterView() {
  return (
    <BrowserRouter>
      <Switch>
        <Route path="/home" component={Home} />
        <Route path="/about" component={About} />
        <Route path="/blank" component={Blank} />
        <Route path="/login" component={Login} />
        <Redirect path="*" to="/home" />
      </Switch>
    </BrowserRouter>
  );
}
